package com.cloud.quickconfigure.rabbitmq;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 监听MQ消息队列
 */
@Component
@RabbitListener(queues = "testQueue")
public class MqReceiver {

    @RabbitHandler
    public void process(String hello) {
        System.out.println("收到消息: " + hello);
    }

}
